﻿/// <reference path="jquery-vsdoc-cn.js" />
$(function() {
    bind_jzoom();
    $("#piclist").imageScroller({
        next: "picbtn1",
        prev: "picbtn2",
        frame: "piclistframe",
        width: 100,
        child: "li",
        auto: false
    });
    $("#hotlist").imageScroller({
        next: "hotbtn1",
        prev: "hotbtn2",
        frame: "hotlistframe",
        width: 100,
        child: "a",
        auto: true
    });
    $("#choiceResult").html("");
    $('span[id^=C_custom_]').each(function() {
        str = $("#choiceResult").html() + $(this).html()+" <br/>";
        $("#choiceResult").html(str);
    });
    $("#txtfieldvalues").val($("#choiceResult").html());
});

function bind_jzoom() {
    $(".jqzoom").jqueryzoom({
        xzoom: 300,
        yzoom: 300,
        offset: 10,
        position: "right",
        preload: 1,
        lens: 1
    });
}
//转到大图
function go_pic_bigpic(objimgid) {
    var tempID = objimgid.id;
    var selectPic = $("#" + tempID).attr("src");
    var selectPic1 = selectPic.replaceAll("products", "productm");
    var selectPic2 = selectPic.replaceAll("products", "productl");
    $("#jqzoomhaha").attr("src", selectPic1).attr("jqimg", selectPic2);
    $("#hignslidepic").attr("href", selectPic2);
}
//选择产品属性
function changeCustom(str1, str2) {
    $("#" + str1).html(str2);
    $("#C_" + str1).html(str2);
    var okResult = $("#" + str1).html();
    $("#choiceResult").html("");
    $('span[id^=C_custom_]').each(function() {
        str = $("#choiceResult").html() + $(this).html()+" <br/>";
        $("#choiceResult").html(str);
    });
    $("#txtfieldvalues").val($("#choiceResult").html());
}

function open_dialge(_width, _height) {
    $.layerSetup({
        id: "sentence",
        title: '图片选择',
        content: '<iframe src="member_" width="100%" height="' + _height + 'px" frameborder="no" scrolling="no"></iframe>',
        isbg: true,
        height: _height,
        width: _width,
        templete: '<div class="mini_title" id="@moveid@"><span class="mini_close_btn"><a href="javascript:void(null);" class="layerclose">关闭</a></span><span class="mini_title_content"><span id="@titleid@"></span></span></div><div class="mini_content"><div class="showwint_mini_content_content" id="@contentid@"></div></div>'
    });
    $.layershow();
}

function pro_ask(_width, _height) {
    $.layerSetup({
        id: "sentence",
        title: '图片选择',
        content: $(".ask").html(),
        isbg: true,
        height: _height,
        width: _width,
        templete: '<div class="mini_title" id="@moveid@"><span class="mini_close_btn"><a href="javascript:void(null);" class="layerclose">关闭</a></span><span class="mini_title_content"><span id="@titleid@"></span></span></div><div class="mini_content"><div class="showwint_mini_content_content" id="@contentid@"></div></div>'
    });
    $.layershow();
}

